<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Module ra_log_reader</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="EDoc">
</head>
<body bgcolor="white">
<div class="navbar"><a name="#navbar_top"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<hr>

<h1>Module ra_log_reader</h1>
<ul class="index"><li><a href="#types">Data Types</a></li><li><a href="#index">Function Index</a></li><li><a href="#functions">Function Details</a></li></ul>


<h2><a name="types">Data Types</a></h2>

<h3 class="typedecl"><a name="type-access_pattern">access_pattern()</a></h3>
<p><pre>access_pattern() = sequential | random</pre></p>
<p>  holds static or rarely changing fields</p>

<h3 class="typedecl"><a name="type-segment_ref">segment_ref()</a></h3>
<p><pre>segment_ref() = 
    {From :: <a href="#type-ra_index">ra_index()</a>, To :: <a href="#type-ra_index">ra_index()</a>, File :: string()}</pre></p>


<h3 class="typedecl"><a name="type-state">state()</a></h3>
<p><b>abstract datatype</b>: <tt>state()</tt></p>


<h2><a name="index">Function Index</a></h2>
<table width="100%" border="1" cellspacing="0" cellpadding="2" summary="function index"><tr><td valign="top"><a href="#init-6">init/6</a></td><td></td></tr>
<tr><td valign="top"><a href="#init-8">init/8</a></td><td></td></tr>
<tr><td valign="top"><a href="#close-1">close/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#update_segments-2">update_segments/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#handle_log_update-2">handle_log_update/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#update_first_index-2">update_first_index/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#segment_refs-1">segment_refs/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#num_open_segments-1">num_open_segments/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#read-3">read/3</a></td><td></td></tr>
<tr><td valign="top"><a href="#read-4">read/4</a></td><td></td></tr>
<tr><td valign="top"><a href="#fetch_term-2">fetch_term/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#delete_closed_mem_table_object-2">delete_closed_mem_table_object/2</a></td><td></td></tr>
<tr><td valign="top"><a href="#closed_mem_tables-1">closed_mem_tables/1</a></td><td></td></tr>
<tr><td valign="top"><a href="#open_mem_table_lookup-1">open_mem_table_lookup/1</a></td><td></td></tr>
</table>

<h2><a name="functions">Function Details</a></h2>

<h3 class="function"><a name="init-6">init/6</a></h3>
<div class="spec">
<p><pre>init(UId :: <a href="#type-ra_uid">ra_uid()</a>,
     Dir :: <a href="/Users/nkarl/code/rabbitmq/kernel/doc/file.html#type-filename">file:filename()</a>,
     FirstIdx :: <a href="#type-ra_index">ra_index()</a>,
     MaxOpen :: non_neg_integer(),
     SegRefs :: [<a href="#type-segment_ref">segment_ref()</a>],
     Names :: <a href="ra_system.html#type-names">ra_system:names()</a>) -&gt;
        <a href="#type-state">state()</a></pre></p>
<p> </p>
</div>

<h3 class="function"><a name="init-8">init/8</a></h3>
<div class="spec">
<p><pre>init(UId :: <a href="#type-ra_uid">ra_uid()</a>,
     Dir :: <a href="/Users/nkarl/code/rabbitmq/kernel/doc/file.html#type-filename">file:filename()</a>,
     FirstIdx :: <a href="#type-ra_index">ra_index()</a>,
     MaxOpen :: non_neg_integer(),
     AccessPattern :: <a href="#type-access_pattern">access_pattern()</a>,
     SegRefs :: [<a href="#type-segment_ref">segment_ref()</a>],
     X7 :: <a href="ra_system.html#type-names">ra_system:names()</a>,
     Counter :: undefined | <a href="/Users/nkarl/code/rabbitmq/erts/doc/counters.html#type-counters_ref">counters:counters_ref()</a>) -&gt;
        <a href="#type-state">state()</a></pre></p>
<p> </p>
</div>

<h3 class="function"><a name="close-1">close/1</a></h3>
<div class="spec">
<p><pre>close(X1 :: <a href="#type-state">state()</a>) -&gt; ok</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="update_segments-2">update_segments/2</a></h3>
<div class="spec">
<p><pre>update_segments(NewSegmentRefs :: [<a href="#type-segment_ref">segment_ref()</a>],
                State :: <a href="#type-state">state()</a>) -&gt;
                   <a href="#type-state">state()</a></pre></p>
<p> </p>
</div>

<h3 class="function"><a name="handle_log_update-2">handle_log_update/2</a></h3>
<div class="spec">
<p><pre>handle_log_update(X1 ::
                      {ra_log_update,
                       undefined | pid(),
                       <a href="#type-ra_index">ra_index()</a>,
                       [<a href="#type-segment_ref">segment_ref()</a>]},
                  State :: <a href="#type-state">state()</a>) -&gt;
                     <a href="#type-state">state()</a></pre></p>
<p> </p>
</div>

<h3 class="function"><a name="update_first_index-2">update_first_index/2</a></h3>
<div class="spec">
<p><pre>update_first_index(Idx :: <a href="#type-ra_index">ra_index()</a>, State :: <a href="#type-state">state()</a>) -&gt;
                      {<a href="#type-state">state()</a>, [<a href="#type-segment_ref">segment_ref()</a>]}</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="segment_refs-1">segment_refs/1</a></h3>
<div class="spec">
<p><pre>segment_refs(X1 :: <a href="#type-state">state()</a>) -&gt; [<a href="#type-segment_ref">segment_ref()</a>]</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="num_open_segments-1">num_open_segments/1</a></h3>
<div class="spec">
<p><pre>num_open_segments(X1 :: <a href="#type-state">state()</a>) -&gt; non_neg_integer()</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="read-3">read/3</a></h3>
<div class="spec">
<p><pre>read(From :: <a href="#type-ra_index">ra_index()</a>, To :: <a href="#type-ra_index">ra_index()</a>, State :: <a href="#type-state">state()</a>) -&gt;
        {[<a href="#type-log_entry">log_entry()</a>], NumRead :: non_neg_integer(), <a href="#type-state">state()</a>}</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="read-4">read/4</a></h3>
<div class="spec">
<p><pre>read(From :: <a href="#type-ra_index">ra_index()</a>,
     To :: <a href="#type-ra_index">ra_index()</a>,
     State :: <a href="#type-state">state()</a>,
     Entries :: [<a href="#type-log_entry">log_entry()</a>]) -&gt;
        {[<a href="#type-log_entry">log_entry()</a>], NumRead :: non_neg_integer(), <a href="#type-state">state()</a>}</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="fetch_term-2">fetch_term/2</a></h3>
<div class="spec">
<p><pre>fetch_term(Idx :: <a href="#type-ra_index">ra_index()</a>, State0 :: <a href="#type-state">state()</a>) -&gt;
              {<a href="#type-ra_index">ra_index()</a>, <a href="#type-state">state()</a>}</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="delete_closed_mem_table_object-2">delete_closed_mem_table_object/2</a></h3>
<div class="spec">
<p><pre>delete_closed_mem_table_object(X1 :: <a href="#type-state">state()</a>, Id :: term()) -&gt;
                                  true</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="closed_mem_tables-1">closed_mem_tables/1</a></h3>
<div class="spec">
<p><pre>closed_mem_tables(X1 :: <a href="#type-state">state()</a>) -&gt; list()</pre></p>
<p> </p>
</div>

<h3 class="function"><a name="open_mem_table_lookup-1">open_mem_table_lookup/1</a></h3>
<div class="spec">
<p><pre>open_mem_table_lookup(X1 :: <a href="#type-state">state()</a>) -&gt; list()</pre></p>
<p> </p>
</div>
<hr>

<div class="navbar"><a name="#navbar_bottom"></a><table width="100%" border="0" cellspacing="0" cellpadding="2" summary="navigation bar"><tr><td><a href="overview-summary.html" target="overviewFrame">Overview</a></td><td><a href="http://www.erlang.org/"><img src="erlang.png" align="right" border="0" alt="erlang logo"></a></td></tr></table></div>
<p><i>Generated by EDoc</i></p>
</body>
</html>
